﻿@using System.Collections.Generic
@using MrCMS.Helpers
@using MrCMS.Website
@model MrCMS.Entities.Resources.StringResource

@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPopup.cshtml";
    var languageOptions = ViewData["language-options"] as List<SelectListItem> ?? new List<SelectListItem>();
}
@using (Html.BeginForm("Add", "Resource", FormMethod.Post))
{
    <fieldset>
        <legend>
            @Resource("Admin Resources Add Override", "Add override") 
            <span class="btn-group display-inline pull-right">
                <input type="submit" class="btn-primary btn" value="@Resource("Save")" />
            </span>
        </legend>
        <p>@Resource("Default"): @Model.DisplayKey</p>
        @Html.ReturnToReferrer()
        @Html.HiddenFor(task => task.Key)
        <div class="form-group">
            @Html.LabelFor(task => task.Value)
            @Html.TextBoxFor(task => task.Value, new { @class = "form-control" })
            @Html.ValidationMessageFor(resource => resource.Value)
        </div>
        <div class="form-group">
            @Html.LabelFor(task => task.UICulture)
            @Html.DropDownListFor(task => task.UICulture, languageOptions, new { @data_val = "true", data_val_required = "Please select a culture.", @class = "form-control" })
            @Html.ValidationMessageFor(resource => resource.UICulture)
        </div>
    </fieldset>
}